// 接⼝继承
// ④接⼝继承
//     接⼝可以通过 extends 继承其他接⼝，实现复⽤和扩展。
// interface 接口名称1 extends 接口名称2,接口名称3 {
//  属性名称:属性类型;
// }

interface Person {
    name: string;
    age: number;
}

interface Address {
    city: string;
}

interface Student extends Person, Address {
    sex: string;
    className: string;
}

let zs: Student = {
    name: "张三",
    age: 18,
    sex: "男",
    className: "1班",
    city: "长沙"
}
console.log(zs)

interface Teacher extends Person, Address {
    teach(): void;
}
let ls: Teacher = {
    name: "李四",
    age: 18,
    teach: function () {
        console.log(" teach ");
    },
    city: "长沙"
}
